{% if mode == 'edit' %}
  {# replace upload form #}
  <div id='replaceUploadForm_{{ upload.id }}' class='mt-1' hidden>
    <form class='form-inline' data-action='replace-uploaded-file' data-long-name='{{ upload.long_name|e('html_attr') }}' data-uploadid='{{ upload.id }}'>
      <input type='file' class='form-control mr-1 mt-1' name='file' required />
      <button type='submit' class='btn btn-primary mt-1'>{{ 'OK'|trans }}</button>
    </form>
  </div>
{% endif %}
